import { TimeOfDay, world } from "@minecraft/server";
import { WereWolfPlayerStateUpdater } from "@/werewolf/components/playerUpdate";
import { WereWolfModule } from "@/werewolf/module";

export class WereWolfMorningPhase extends WereWolfModule.State {
    override onEnter(): void {
        this.addComponent(WereWolfPlayerStateUpdater);
        this.addComponents(this.context.map.phaseViews.morning);

        world.setTimeOfDay(TimeOfDay.Day);
        world.gameRules.pvp = false;
    }

    next() {
        this.popState();
    }
}
